package com.ranshiyan.utils;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

/**
 * 
 * @author zhuzg
 *
 */
public class FileUtils {
	
	public static List<String> readFileByLines(String fileName) throws IOException{
		
		List<String> list =  new ArrayList<String>();
		
		File file = new File(fileName);
		FileReader fileReader = new FileReader(file);
		BufferedReader reader = new BufferedReader(fileReader);
		String line=null;
		while((line=reader.readLine())!=null) {
			list.add(line);
		}
		reader.close();
		return list;
		
		
		
		
		
	}
}
